export default function (http){
	return {
		login (data){
			return http
				.mock(function () {
					return {key: 'xxxx'}
				})
				.postJson('/demo/auth/login', data);
		},

		info (){
			return http
				.mock(function () {
					return {
						id: '1',
						nickname: '张三',
						roleName: '超级管理员',
						mobile: '18888888888'
					}
				})
				.get('/demo/auth/info', {loading: '正在获取用户信息'});
		},

		menus (){
			return http
				.mock(function () {
					return [
						{
							name: '首页',
							code: 'index',
							icon: 'ft-shouye'
						},
						{
							name: '系统设置',
							code: 'system',
							icon: 'ft-xitongshezhi',
							children: [
								{
									name: '消息通知',
									code: 'message',
									icon: 'ft-xiaoxi',
								},
								{
									name: '账号管理',
									code: 'account',
									icon: 'ft-zhanghaoquanxianguanli',
								},
								{
									name: '角色管理',
									code: 'role',
									icon: 'ft-zhanghaozhongxinzhanghaoguanli',
								},
								{
									name: '菜单管理',
									code: 'menu',
									icon: 'ft-caidan',
								},
								{
									name: '字典管理',
									code: 'dict',
									icon: 'ft-zidianguanli',
								}
							]
						}
					]
				})
				.get('/demo/auth/menus', {loading: '正在获取权限信息'});
		},

		buttons (){
			return http
				.mock()
				.get('/demo/auth/buttons', {loading: '正在获取权限信息'});
		}
	}
}
